package com.itheima.exerciseTest.test01_09;

public class Test5 {
    public static void main(String[] args) {
        Outer o = new Outer();
        InterTest5 i = o.getInner();
        i.method1();
        i.method2();
    }
}

class Outer {
    int age = 50;
    private class Inner implements InterTest5 {
        public void method1() {
            System.out.println(age);
        }
        public void method2() {
            System.out.println("你好");
        }
    }
    public InterTest5 getInner(){
        return new Inner();
    }
}

interface InterTest5 {
    void method1();
    void method2();
}
